package com.行为型模型.W解释器模式;

import java.util.HashMap;
import java.util.Map;

/**
 * 环境类
 */
public class Context {

   private Map<Variable,Integer> map=new HashMap<Variable,Integer>();
    //赋值
   public void assign(Variable var,Integer value){
       map.put(var,value);
   }

   public int getValue(Variable variable){
       return map.get(variable);
   }

}
